home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / graphics / pbm / pbm_man.zoo / man1 / ppmquant.1 < prev    next >
Text File  |  1994-08-27  |  2KB  |  67 lines

  1.  
  2.  
  3.  
  4. ppmquant(1)              USER COMMANDS                ppmquant(1)
  5.  
  6.  
  7.  
  8. NAME
  9.      ppmquant - quantize the colors in a portable pixmap down  to
  10.      a specified number
  11.  
  12. SYNOPSIS
  13.      ppmquant [-floyd|-fs] _✓n_✓c_✓o_✓l_✓o_✓r_✓s [_✓p_✓p_✓m_✓f_✓i_✓l_✓e]
  14.      ppmquant [-floyd|-fs] -map _✓m_✓a_✓p_✓f_✓i_✓l_✓e [_✓p_✓p_✓m_✓f_✓i_✓l_✓e]
  15.  
  16. DESCRIPTION
  17.      Reads a portable pixmap as input.  Chooses _✓n_✓c_✓o_✓l_✓o_✓r_✓s colors to
  18.      best  represent  the  image, maps the existing colors to the
  19.      new ones, and writes a portable pixmap as output.
  20.  
  21.      The quantization method is Heckbert's "median cut".
  22.  
  23.      Alternately, you can skip the color-choosing step by  speci-
  24.      fying  your  own set of colors with the -map flag.  The _✓m_✓a_✓p_✓-
  25.      _✓f_✓i_✓l_✓e is just a _✓p_✓p_✓m file; it  can  be  any  shape,  all  that
  26.      matters is the colors in it.  For instance, to quantize down
  27.      to the 8-color IBM TTL color set, you might use:
  28.          P3
  29.          8 1
  30.          255
  31.            0   0   0
  32.          255   0   0
  33.            0 255   0
  34.            0   0 255
  35.          255 255   0
  36.          255   0 255
  37.            0 255 255
  38.          255 255 255
  39.  
  40.      The -floyd/-fs flag enables a Floyd-Steinberg  error  diffu-
  41.      sion  step.   Floyd-Steinberg gives vastly better results on
  42.      images where the  unmodified  quantization  has  banding  or
  43.      other  artifacts, especially when going to a small number of
  44.      colors such as the above IBM set.   However,  it  does  take
  45.      substantially more CPU time, so the default is off.
  46.  
  47.      All flags can be abbreviated to their shortest  unique  pre-
  48.      fix.
  49.  
  50. REFERENCES
  51.      "Color Image Quantization for Frame Buffer Display" by  Paul
  52.      Heckbert, SIGGRAPH '82 Proceedings, page 297.
  53.  
  54. SEE ALSO
  55.      pnmdepth(1), ppmquantall(1), ppm(5)
  56.  
  57. AUTHOR
  58.      Copyright (C) 1989, 1991 by Jef Poskanzer.
  59.  
  60.  
  61.  
  62.  
  63. Sun Release 4.0   Last change: 12 January 1991                  1
  64.  
  65.  
  66.  
  67.